"""rules_tsickle provides bazel rules for transforming ts files to closure compatible js"""

module(
    name = "rules_tsickle",
    version = "1.0.0",
    compatibility_level = 1,
)

# -----------------------------------------------------------------
# bazel_dep(s) - core dependencies, keep sorted alphabetically
# -----------------------------------------------------------------

bazel_dep(name = "aspect_bazel_lib", version = "2.21.0")
bazel_dep(name = "aspect_rules_js", version = "2.6.0")
bazel_dep(name = "aspect_rules_ts", version = "3.7.0")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "rules_nodejs", version = "6.5.0")

# --------------------------------------------------------------------------------
# language js configuration
# --------------------------------------------------------------------------------

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = False)
node.toolchain(node_version = "22.14.0")
use_repo(node, "nodejs_toolchains")

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = False)
npm.npm_translate_lock(
    name = "npm_tsickle",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm_tsickle")

pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
use_repo(pnpm, "pnpm")

# --------------------------------------------------------------------------------
# language ts configuration
# --------------------------------------------------------------------------------

rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext")
rules_ts_ext.deps(ts_version_from = "//:package.json")
use_repo(rules_ts_ext, "npm_typescript")
